<?php
namespace App\Services\Chanjet;

//畅捷通工具类
class ChanjetSubscribeConfig {
    public static $Field =
    [
        //采购发票
        "TplusPurchaseInvoice" =>[
            "config"=> [
                "code" => "PurchaseInvoice",
                "Model" => "TplusPurchaseInvoice",
                "ListModel" => "TplusPurchaseInvoice",
                "InfoModel" => "TplusPurchaseInvoiceInfo",
                "queryApi" => "PurchaseInvoiceOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "PurchaseInvoice.ID",
                    "voucher_code" => "PurchaseInvoice.Code",
                    "voucher_date" => "PurchaseInvoice.VoucherDate",
                    "voucher_time|int" => "PurchaseInvoice.VoucherDate",

                    "clerk_name" => "PurchaseInvoice.Clerk.Name",
                    "partner_name" => "PurchaseInvoice.Partner.Name",

                    "invoice_type" => "PurchaseInvoice.InvoiceType.Name",
                    "business_type" => "PurchaseInvoice.BusinessType.Name",

                    "carship_no" => "PurchaseInvoice.pubuserdefnvc1",
                ],
                "infoField" => [
                    "voucher_id" => "PurchaseInvoice.ID",
                    "voucher_code" => "PurchaseInvoice.Code",
                    "voucher_date" => "PurchaseInvoice.VoucherDate",

                    "warehouse_name" => "PurchaseInvoice.PurchaseInvoiceDetails.Warehouse.Name",
                    "inventory_name" => "PurchaseInvoice.PurchaseInvoiceDetails.Inventory.Name",
                    "unit_name" => "PurchaseInvoice.PurchaseInvoiceDetails.Unit.Name",
                    "quantity" => "PurchaseInvoice.PurchaseInvoiceDetails.Quantity",
                    "taxRate" => "PurchaseInvoice.PurchaseInvoiceDetails.TaxRate",
                    "OrigTaxPrice" => "PurchaseInvoice.PurchaseInvoiceDetails.OrigTaxPrice",
                    "OrigTaxAmount" => "PurchaseInvoice.PurchaseInvoiceDetails.OrigTaxAmount",

                    "steel_factory_name" => "PurchaseInvoice.PurchaseInvoiceDetails.pubuserdefnvc1",
                    "material_name" => "PurchaseInvoice.PurchaseInvoiceDetails.pubuserdefnvc2",
                    "breed_name" => "PurchaseInvoice.PurchaseInvoiceDetails.pubuserdefnvc3",
                    "ts" => "PurchaseInvoice.PurchaseInvoiceDetails.Ts"
                    //"archive_spec" => "",
                ]
            ]
        ],
        //销售发票
        "TplusSaleInvoice" =>[
            "config"=> [
                "code" => "SaleInvoice",
                "Model" => "TplusSaleInvoice",
                "ListModel" => "TplusSaleInvoice",
                "InfoModel" => "TplusSaleInvoiceInfo",
                "queryApi" => "SaleInvoiceOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "SaleInvoice.ID",
                    "voucher_code" => "SaleInvoice.Code",
                    "voucher_date" => "SaleInvoice.VoucherDate",
                    "voucher_time|int" => "SaleInvoice.VoucherDate",

                    "clerk_name" => "SaleInvoice.Clerk.Name",
                    "settle_customer" => "SaleInvoice.SettleCustomer.Name",
                    "invoice_type" => "SaleInvoice.InvoiceType.Name",
                    "carship_no" => "SaleInvoice.pubuserdefnvc1",
                ],
                "infoField" => [
                    "voucher_id" => "SaleInvoice.ID",

                    //"warehouse_name" => "PurchaseInvoice.PurchaseInvoiceDetails.Warehouse.Name", 仓库名
                    "inventory_name" => "SaleInvoice.SaleInvoiceDetails.Inventory.Name",
                    "unit" => "SaleInvoice.SaleInvoiceDetails.Unit.Name",
                    "quantity" => "SaleInvoice.SaleInvoiceDetails.Quantity",
                    "taxRate" => "SaleInvoice.SaleInvoiceDetails.TaxRate",
                    "OrigTaxPrice|decimal" => "SaleInvoice.SaleInvoiceDetails.OrigTaxPrice",
                    "OrigTaxAmount|decimal" => "SaleInvoice.SaleInvoiceDetails.OrigTaxAmount",
                    "ts" => "SaleInvoice.SaleInvoiceDetails.Ts",
                    //"archive_spec" => "",
                ]
            ]
        ],
        //其他入库单
        "TplusOtherInboundOrder" =>[
            "config"=> [
                "code" => "RDRecord",
                "Model" => "TplusOtherInboundOrder",
                "ListModel" => "TplusOtherInboundOrder",
                "InfoModel" => "TplusOtherInboundOrderInfo",
                "queryApi" => "OtherReceiveOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "RDRecord.ID",
                    "voucher_code" => "RDRecord.Code",
                    "voucher_date" => "RDRecord.VoucherDate",
                    "voucher_time|int" => "RDRecord.VoucherDate",

                    "business_type" => "RDRecord.BusiType.Name",
                    "partner_name" => "RDRecord.Partner.Name",
                    "warehouse_name" => "RDRecord.Warehouse.Name",
                    "carship_no" => "RDRecord.pubuserdefnvc1", //车船号  暂无
                ],
                "infoField" => [
                    "voucher_id" => "RDRecord.ID",

                    "inventory_name" => "RDRecord.RDRecordDetails.Inventory.Name",
                    "size_model" => "RDRecord.RDRecordDetails.Inventory.Specification",

                    "assoc_voucher_number" => "RDRecord.RDRecordDetails.SourceVoucherCode",
                    "assoc_voucher" => "RDRecord.RDRecordDetails.SourceVoucherType",

                    "steel_factory_name" => "RDRecord.RDRecordDetails.pubuserdefnvc1",
                    "material_name" => "RDRecord.RDRecordDetails.pubuserdefnvc2",
                    "breed_name" => "RDRecord.RDRecordDetails.pubuserdefnvc3",
                ]
            ]
        ],
        //其他出库单
        "TplusOtherOutboundOrder" =>[
            "config"=> [
                "code" => "RDRecord",
                "Model" => "TplusOtherOutboundOrder",
                "ListModel" => "TplusOtherOutboundOrder",
                "InfoModel" => "TplusOtherOutboundOrderInfo",
                "queryApi" => "OtherDispatchOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "RDRecord.ID",
                    "voucher_code" => "RDRecord.Code",
                    "voucher_date" => "RDRecord.VoucherDate",
                    "voucher_time|int" => "RDRecord.VoucherDate",

                    "business_type" => "RDRecord.BusiType.Name",
                    //"customer_name" => "RDRecord.BusiType.Name", 客户
                ],
                "infoField" => [
                    "voucher_id" => "RDRecord.ID",

                    "inventory_name" => "RDRecord.RDRecordDetails.Inventory.Name",
                    "warehouse_name" => "RDRecord.RDRecordDetails.Warehouse.Name",

                    //"assoc_document_no" => "",//关联单号
                    //"assoc_document" => "",//关联单据
                    //"remain_quantity" => "",//结存数量

                    //"before_adjust_price" => "",//调前单价
                    //"before_adjust_amount" => "",//调前金额
                    //"after_adjust_price" => "",//调后单价
                    //"after_adjust_amount" => "",//调后金额
                    //"adjust_amount" => "",//调整金额
                ]
            ]
        ],
        //入库调整单
        "TplusInboundAdjustmentOrder" =>[
            "config"=> [
                "code" => "AdjustCostVoucher",
                "Model" => "TplusInboundAdjustmentOrder",
                "ListModel" => "TplusInboundAdjustmentOrder",
                "InfoModel" => "TplusInboundAdjustmentOrderInfo",
                "queryApi" => "AdjustCostInOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "AdjustCostVoucher.ID",
                    "voucher_code" => "AdjustCostVoucher.Code",
                    "voucher_date" => "AdjustCostVoucher.VoucherDate",
                    "voucher_time|int" => "AdjustCostVoucher.VoucherDate",

                    "business_type" => "AdjustCostVoucher.AdjustType.Name",
                    "partner_name" => "AdjustCostVoucher.Partner.Name",
                    "warehouse_name" => "AdjustCostVoucher.Warehouse.Name",
                    "carship_no" => "AdjustCostVoucher.pubuserdefnvc1", //车船号  暂无
                ],
                "infoField" => [
                    "voucher_id" => "AdjustCostVoucher.ID",

                    "inventory_name" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",
                    "steel_factory_name" => "AdjustCostVoucher.AdjustCostDetails.pubuserdefnvc1",//钢厂
                    "material_name" => "AdjustCostVoucher.AdjustCostDetails.pubuserdefnvc2",//材质
                    "breed_name" => "AdjustCostVoucher.AdjustCostDetails.pubuserdefnvc3",//品种


                    "size_model" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Specification",//规格型号
//                    "assoc_document_no" => "AdjustCostVoucher.AdjustCostDetails.SourceVoucherCode",//关联单号
//                    "assoc_document" => "AdjustCostVoucher.SourceVoucherType.Name",//关联单据
                    "amount" => "AdjustCostVoucher.AdjustCostDetails.Amount",//金额
//
//
//        "accrual" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//计提
//        "freight_diff" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//运差
//        "good_diff" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//货差
//        "achieve" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//业绩
                ]
            ]
        ],
        //出库调整单
        "TplusOutboundAdjustmentOrder" =>[
            "config"=> [
                "code" => "AdjustCostVoucher",
                "Model" => "TplusOutboundAdjustmentOrder",
                "ListModel" => "TplusOutboundAdjustmentOrder",
                "InfoModel" => "TplusOutboundAdjustmentOrderInfo",
                "queryApi" => "AdjustCostOutOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "AdjustCostVoucher.ID",
                    "voucher_code" => "AdjustCostVoucher.Code",
                    "voucher_date" => "AdjustCostVoucher.VoucherDate",
                    "voucher_time|int" => "AdjustCostVoucher.VoucherDate",

//                    "business_type" => "AdjustCostVoucher.BusiType.Name",
                    "customer_name" => "AdjustCostVoucher.Partner.Name",
                ],
                "infoField" => [
                    "voucher_id" => "AdjustCostVoucher.ID",

                    "inventory_name" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",
                    "warehouse_name" => "AdjustCostVoucher.AdjustCostDetails.Warehouse.Name",

//        "assoc_document_no" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//关联单号
//        "assoc_document" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//关联单据
//        "remain_quantity" => "AdjustCostVoucher.AdjustCostDetails.Inventory.Name",//结存数量
//        "before_adjust_price"=>"",//调前单价
//        "before_adjust_amount"=>"",//调前金额
//        "after_adjust_price"=>"",//调后单价
//        "after_adjust_amount"=>"",//调后金额
//        "adjust_amount"=>"",//调整金额
                ]
            ]
        ],
        //调拨单
        "TplusTransferOrder" =>[
            "config"=> [
                "code" => "TransVoucher",
                "Model" => "TplusTransferOrder",
                "ListModel" => "TplusTransferOrder",
                "InfoModel" => "TplusTransferOrderInfo",
                "queryApi" => "TransVoucherOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "TransVoucher.ID",
                    "voucher_code" => "TransVoucher.Code",
                    "voucher_date" => "TransVoucher.VoucherDate",
                    "voucher_time|int" => "TransVoucher.VoucherDate",

                    "business_type" => "TransVoucher.BusiType.Name",
                    "bring_warehouse" => "TransVoucher.OutWarehouse.Name",//调出仓库名称
                    "pull_warehouse" => "TransVoucher.InWarehouse.Name",//调入仓库名称
                ],
                "infoField" => [
                    "voucher_id" => "TransVoucher.ID",

                    "inventory_name" => "TransVoucher.TransDetails.Inventory.Name",
//        "size_model" => "TransVoucher.TransDetails.Inventory.Name",//规格型号
                    "unit" => "TransVoucher.TransDetails.Unit.Name",//计量单位
                    "quantity" => "TransVoucher.TransDetails.Quantity",//数量
                    "quantity2" => "TransVoucher.TransDetails.Quantity2",//数量2
                    "out_amount|decimal" => "TransVoucher.TransDetails.OutAmount",//调出金额
                    "in_amount|decimal" => "TransVoucher.TransDetails.InAmount",//调入金额
                ]
            ]
        ],
        //收款单
        "TplusReceiptOrder" =>[
            "config"=> [
                "code" => "ArapReceivePayment",
                "Model" => "TplusReceiptOrder",
                "ListModel" => "TplusReceiptOrder",
                "queryApi" => "ReceiveVoucherOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "TransVoucher.ID",
                    "voucher_code" => "TransVoucher.Code",
                    "voucher_date" => "TransVoucher.VoucherDate",
                    "voucher_time|int" => "TransVoucher.VoucherDate",

                    "business_type" => "TransVoucher.BusiType.Name",
                    "bring_warehouse" => "TransVoucher.OutWarehouse.Name",//调出仓库名称
                    "pull_warehouse" => "TransVoucher.InWarehouse.Name",//调入仓库名称
                ],
            ]
        ],
        //付款单
        "TplusPaymentOrder" =>[
            "config"=> [
                "code" => "ArapReceivePayment",
                "Model" => "TplusPaymentOrder",
                "ListModel" => "TplusPaymentOrder",
                "queryApi" => "PaymentVoucherOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "ArapReceivePayment.ID",
                    "voucher_code" => "ArapReceivePayment.Code",
                    "voucher_date" => "ArapReceivePayment.VoucherDate",
                    "voucher_time|int" => "ArapReceivePayment.VoucherDate",

                    "partner_name" => "ArapReceivePayment.partnerName",
//                    "other_party_bank" => "ArapReceivePayment.OutWarehouse.Name",
//                    "other_party_bank_no" => "ArapReceivePayment.InWarehouse.Name",
//                    "department_name" => "ArapReceivePayment.InWarehouse.Name",
//                    "clerk_name" => "ArapReceivePayment.InWarehouse.Name",
                ],
            ]
        ],
        //盘点单
        "TplusCountOrder" =>[
            "config"=> [
                "code" => "CheckVoucher",
                "model" => "TplusCountOrder",
                "ListModel" => "TplusCountOrder",
                "InfoModel" => "TplusCountOrderInfo",
                "queryApi" => "CheckVoucherOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "CheckVoucher.ID",
                    "voucher_code" => "CheckVoucher.Code",
                    "voucher_date" => "CheckVoucher.VoucherDate",
                    "voucher_time|int" => "CheckVoucher.VoucherDate",

                    //"count_date" => "CheckVoucher.BusiType.Name",
//                    "partner_name" => "CheckVoucher.Partner.Name",
//                    "warehouse_name" => "CheckVoucher.Warehouse.Name",
//                    "carship_no" => "CheckVoucher.pubuserdefnvc1",
                ],
                "infoField" => [
//                    "unit" => "CheckVoucher.unit.Name",
                    "voucher_id" => "CheckVoucher.ID",
                ]
            ]
        ],
        //采购费用分摊单
        "TplusFeeCostShare" =>[
            "config"=> [
                "code" => "ArapStrikeBalance",
                "Model" => "TplusFeeCostShare",
                "ListModel" => "TplusFeeCostShare",
//                "InfoModel" => "",
//                "Info2Model" => "",
//                "queryApi" => "",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                    "voucher_code" => "ArapStrikeBalance.Code",
                    "voucher_date" => "ArapStrikeBalance.VoucherDate",
                    "voucher_time|int" => "ArapStrikeBalance.VoucherDate",

                    "business_type" => "ArapStrikeBalance.BusiType.Name",
                    "bring_warehouse" => "ArapStrikeBalance.OutWarehouse.Name",//调出仓库名称
                    "pull_warehouse" => "ArapStrikeBalance.InWarehouse.Name",//调入仓库名称
                ],
                "infoField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",

                ],
                "info2Field" => [
                    "voucher_id" => "ArapStrikeBalance.ID",

                ],
            ]
        ],

        //预收冲应收列表
        "TplusPreReceivableToReceivable" =>[
            "config"=> [
                "code" => "ArapStrikeBalance",
                "Model" => "TplusPreReceivableToReceivable",
                "ListModel" => "TplusPreReceivableToReceivable",
                "InfoModel" => "TplusPreReceivableToReceivable",
                "Info2Model" => "TplusPreReceivableToReceivableOfPreReceivableInfo",
                "queryApi" => "StrikeBalanceAdvReceiveArOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                    "voucher_code" => "ArapStrikeBalance.Code",
                    "voucher_date" => "ArapStrikeBalance.VoucherDate",
                    "voucher_time|int" => "ArapStrikeBalance.VoucherDate",

                    "business_type" => "ArapStrikeBalance.BusiType.Name",
                    "bring_warehouse" => "ArapStrikeBalance.OutWarehouse.Name",//调出仓库名称
                    "pull_warehouse" => "ArapStrikeBalance.InWarehouse.Name",//调入仓库名称
                ],
                "infoField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",

                ],
                "info2Field" => [
                    "voucher_id" => "ArapStrikeBalance.ID",

                ],
            ]
        ],
        //预付冲应付列表
        "TplusPrePaymentToPayment" =>[
            "config"=> [
                "code" => "ArapStrikeBalance",
                "Model" => "TplusPrePaymentToPayment",
                "ListModel" => "TplusPrePaymentToPayment",
                "InfoModel" => "TplusPrePaymentToPaymentForPayment",
                "Info2Model" => "TplusPrePaymentToPaymentForPrePayment",
                "queryApi" => "StrikeBalanceAdvReceiveArOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                    "voucher_code" => "ArapStrikeBalance.Code",
                    "voucher_date" => "ArapStrikeBalance.VoucherDate",
                    "voucher_time|int" => "ArapStrikeBalance.VoucherDate",

                    "business_type" => "ArapStrikeBalance.BusiType.Name",
                    "bring_warehouse" => "ArapStrikeBalance.OutWarehouse.Name",//调出仓库名称
                    "pull_warehouse" => "ArapStrikeBalance.InWarehouse.Name",//调入仓库名称
                ],
                "infoField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                ],
                "info2Field" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                ],
            ]
        ],
        //应收冲应收
        "TplusReceivableToReceivable" =>[
            "config"=> [
                "code" => "ArapStrikeBalance",//报表类,查询条件不需要拼接
                "Model" => "TplusReceivableToReceivable",
                "ListModel" => "TplusReceivableToReceivable",
                "InfoModel" => "TplusReceivableToReceivableInfo",
                "queryApi" => "StrikeBalanceArArOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_code" => "ArapStrikeBalance.voucherCode",
                    "voucher_date" => "ArapStrikeBalance.voucherDate",
                    "voucher_time|int" => "ArapStrikeBalance.voucherDate",
                ],
                "infoField" => [
                    "voucher_id" => "TransVoucher.ID",
                ],
            ]
        ],
        //应付冲应付
        "TplusPaymentToPayment" =>[
            "config"=> [
                "code" => "ArapStrikeBalance",//报表类,查询条件不需要拼接
                "Model" => "TplusPaymentToPayment",
                "ListModel" => "TplusPaymentToPayment",
                "infoModel" => "TplusPaymentToPaymentInfo",
                "queryApi" => "StrikeBalanceApApOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_code" => "ArapStrikeBalance.voucherCode",
                    "voucher_date" => "ArapStrikeBalance.voucherDate",
                    "voucher_time|int" => "ArapStrikeBalance.voucherDate",
                ],
                "infoField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                ],
            ]
        ],
        //应收冲应付
        "TplusReceivableToPayment" =>[
            "config"=> [
                "code" => "ArapStrikeBalance",
                "Model" => "TplusReceivableToPayment",
                "ListModel" => "TplusReceivableToPayment",
                "InfoModel" => "TplusReceivableToPaymentForReceivableInfo",
                "Info2Model" => "TplusReceivableToPaymentForPaymentInfo",
                "queryApi" => "StrikeBalanceArApOpenApiFindVoucherList",
            ],
            "Field" => [
                "listField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",
                    "voucher_code" => "ArapStrikeBalance.Code",
                    "voucher_date" => "ArapStrikeBalance.VoucherDate",
                    "voucher_time|int" => "ArapStrikeBalance.VoucherDate",

                    "business_type" => "ArapStrikeBalance.BusiType.Name",
                    "bring_warehouse" => "ArapStrikeBalance.OutWarehouse.Name",//调出仓库名称
                    "pull_warehouse" => "ArapStrikeBalance.InWarehouse.Name",//调入仓库名称
                ],
                "infoField" => [
                    "voucher_id" => "ArapStrikeBalance.ID",

                ],
                "info2Field" => [
                    "voucher_id" => "ArapStrikeBalance.ID",

                ],
            ]
        ],
        //应收总账
        "TplusReceiveLedger" =>[
            "config"=> [
                "ReportName" => "ARAP_ReceiveAccountSumRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusReceiveLedger",
                "ListModel" => "TplusReceiveLedger",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
//                    "voucher_id" => "ID",
//                    "voucher_code" => "Code",
                    "voucher_date" => "voucherDate",
                    "voucher_time|int" => "voucherDate",
                    "settle_customer" => "partnerName",
                    "open_balance|decimal" => "origPeriodAmount",
                    "should_charged|decimal" => "origAmount",
                    "has_charged|decimal" => "origSettleAmount",
                    "close_balance|decimal" => "origBalanceAmount",
                ],
            ]
        ],
        //应收明细
        "TplusReceiveDetail" =>[
            "config"=> [
                "ReportName" => "ARAP_ReceiveAccountDetailRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusReceiveDetail",
                "ListModel" => "TplusReceiveDetail",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
//                    "voucher_code" => "voucherCode",
                    "voucher_date" => "voucherDate",
                    "voucher_time|int" => "voucherDate",
                    "customer_name" => "noSettlepartnerName",
                    "department_name" => "departmentName",
                    "clerk_name" => "personName",
                    "remark" => "memo",
                    "should_charged|decimal" => "origAmount",
                    "has_charged|decimal" => "origSettleAmount",
                    "balance|decimal" => "origBalanceAmount",
                ],
            ]
        ],
        //应付总账
        "TplusPaymentLedger" =>[
            "config"=> [
                "ReportName" => "ARAP_PaymentAccountSumRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusPaymentLedger",
                "ListModel" => "TplusPaymentLedger",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
//                    "voucher_code" => "voucherCode",
//                    "voucher_date" => "voucherDate",
//                    "voucher_time" => "voucherDate",
                    "partner_category" => "partnerClassName",
                    "partner_name" => "partnerName",
                    "open_balance|decimal" => "origPeriodAmount",
                    "should_payment|decimal" => "origAmount",
                    "has_payment|decimal" => "origSettleAmount",
                    "close_balance|decimal" => "origBalanceAmount",

                ],
            ]
        ],
        //存货明细
        "TplusInventoryInfo" =>[
            "config"=> [
                "ReportName" => "ST_RDSInventoryDetailRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusInventoryInfo",
                "ListModel" => "TplusInventoryInfo",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
                    "voucher_code" => " VoucherCode",
                    "voucher_date" => "VoucherDate",
                    "voucher_time|int" => "VoucherDate",
                    //"voucher_type" => "voucherTypeName",
                    "business_type" => "BusinessType",
                    "warehouse_no" => "WarehouseCode",
                    "warehouse_name" => "Warehouse",
                    "inventory_no" => "InventoryCode",
                    "inventory_name" => "InventoryName",
                    "size_model" => "Specification",
                    "unit" => "BaseUnit",
                    "in_date" => "Period",
                    "inventory_class" => "InventoryClass",
                    "certificate" => "docno",
                    "correspondents" => "Partner",
                    "revenue_json" => "ArrivalBaseQuantity,ArrivalPrice,ArrivalSubQuantity,ArrivalSubPrice,ArrivalAmount",
                    "emit_json" => "DispatchBaseQuantity,DispatchPrice,DispatchSubQuantity,DispatchSubPrice,DispatchAmount",
                    "settle_balance_json" => "BaseQuantity,Price,SubQuantity,SubPrice,Amount",
                ],
            ]
        ],
        //应付明细
        "TplusPaymentDetail" =>[
            "config"=> [
                "ReportName" => "ARAP_PaymentAccountDetailRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusPaymentDetail",
                "ListModel" => "TplusPaymentDetail",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
//                    "voucher_code" => "voucherCode",
//                    "voucher_date" => "voucherDate",
//                    "voucher_time|int" => "voucherDate",
                    //"voucher_type" => "voucherTypeName",
                    "partner_name" => "partnerName",
                    "department_name" => "departmentName",
                    "clerk_name" => "personName",
                    "remark" => "memo",
                    "should_payment|decimal" => "origAmount",
                    "has_payment|decimal" => "origSettleAmount",
                    "balance|decimal" => "origBalanceAmount",
                ],
            ]
        ],
        //存货总账
        "TplusInventoryLedger" =>[
            "config"=> [
                "ReportName" => "ST_RDSInventoryTotalRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusInventoryLedger",
                "ListModel" => "TplusInventoryLedger",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
//                    "voucher_code" => "voucherCode",
//                    "voucher_date" => "voucherDate",
//                    "voucher_time|int" => "voucherDate",
                    //"voucher_type" => "voucherTypeName",
                    "warehouse_no" => "WarehouseCode",
                    "warehouse_name" => "Warehouse",
                    "inventory_class" => "InventoryClass_lev1",
                    "inventory_no" => "InventoryCode",
                    "inventory_name" => "Inventory",
                    "size_model" => "Specification",
                    "unit" => "BaseUnit",

                    "open_balance_num" => "BeginBaseQuantity|[PeriodStartColumn-期初结存][BeginBaseQuantity-数量]",
                    "open_balance_price|decimal" => "BeginPrice|[PeriodStartColumn-期初结存][BeginPrice-平均单价]",
                    "open_balance_amount|decimal" => "BeginAmount|[PeriodStartColumn-期初结存][BeginAmount-金额]",

                    "current_revenue_num" => "ArrivalBaseQuantity|[ArrivalColumn-本期收入][ArrivalBaseQuantity-数量]",
                    "current_revenue_price|decimal" => "ArrivalPrice|[ArrivalColumn-本期收入][ArrivalPrice-平均单价]",
                    "current_revenue_amount|decimal" => "ArrivalAmount|[ArrivalColumn-本期收入][ArrivalAmount-金额]",
                ],
            ]
        ],
        //呆滞存货分析
        "TplusSluggishInventoryAnalysis" =>[
            "config"=> [
                "ReportName" => "ST_ObsoleteMaterialRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusSluggishInventoryAnalysis",
                "ListModel" => "TplusSluggishInventoryAnalysis",
                "InfoModel" => "TplusSluggishInventoryAnalysisInfo",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
                    "voucher_code" => "voucherCode",
                    "voucher_date" => "voucherDate",
                    "voucher_time|int" => "voucherDate",
                    //"voucher_type" => "voucherTypeName",
                    "business_type" => "BusinessType",
                    "warehouse_no" => "WarehouseCode",
                    "warehouse_name" => "Warehouse",
                    "inventory_no" => "InventoryCode",
                    "inventory_name" => "InventoryName",
                    "size_model" => "Specification",
                    "unit" => "BaseUnit",
                    "in_date" => "Period",
                    "inventory_class" => "InventoryClass",
                    "certificate" => "docno",
                    "correspondents" => "Partner",
                    "revenue_json" => "ArrivalBaseQuantity,ArrivalPrice,ArrivalSubQuantity,ArrivalSubPrice,ArrivalAmount",
                    "emit_json" => "DispatchBaseQuantity,DispatchPrice,DispatchSubQuantity,DispatchSubPrice,DispatchAmount",
                    "settle_balance_json" => "BaseQuantity,Price,SubQuantity,SubPrice,Amount",
                ],
                "infoField" => [
                    "voucher_code" => "voucherCode",
                ],
            ]
        ],
        //库存周转率分析
        "TplusInventoryTurnoverAnalysis" =>[
            "config"=> [
                "ReportName" => "ST_MaterialTurnoverRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusInventoryTurnoverAnalysis",
                "ListModel" => "TplusInventoryTurnoverAnalysis",
                "InfoModel" => "TplusInventoryTurnoverAnalysisInfo",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
                    "voucher_code" => "voucherCode",
                    "voucher_date" => "voucherDate",
                    "voucher_time|int" => "voucherDate",
                    //"voucher_type" => "voucherTypeName",
                    "business_type" => "BusinessType",
                    "warehouse_no" => "WarehouseCode",
                    "warehouse_name" => "Warehouse",
                    "inventory_no" => "InventoryCode",
                    "inventory_name" => "InventoryName",
                    "size_model" => "Specification",
                    "unit" => "BaseUnit",
                    "in_date" => "Period",
                    "inventory_class" => "InventoryClass",
                    "certificate" => "docno",
                    "correspondents" => "Partner",
                    "revenue_json" => "ArrivalBaseQuantity,ArrivalPrice,ArrivalSubQuantity,ArrivalSubPrice,ArrivalAmount",
                    "emit_json" => "DispatchBaseQuantity,DispatchPrice,DispatchSubQuantity,DispatchSubPrice,DispatchAmount",
                    "settle_balance_json" => "BaseQuantity,Price,SubQuantity,SubPrice,Amount",
                ],
                "infoField" => [
                    "voucher_code" => "voucherCode",
                ],
            ]
        ],
        //库龄分析
        "TplusInventoryAgeAnalysis" =>[
            "config"=> [
                "ReportName" => "ST_StockAgeRpt",
                "code" => "report",//报表类,查询条件不需要拼接
                "Model" => "TplusInventoryAgeAnalysis",
                "ListModel" => "TplusInventoryAgeAnalysis",
                "InfoModel" => "TplusInventoryAgeAnalysisInfo",
                "queryApi" => "reportQueryGetReportData",
            ],
            "Field" => [
                "listField" => [
                    "voucher_code" => "voucherCode",
                    "voucher_date" => "voucherDate",
                    "voucher_time|int" => "voucherDate",
                    //"voucher_type" => "voucherTypeName",
                    "business_type" => "BusinessType",
                    "warehouse_no" => "WarehouseCode",
                    "warehouse_name" => "Warehouse",
                    "inventory_no" => "InventoryCode",
                    "inventory_name" => "InventoryName",
                    "size_model" => "Specification",
                    "unit" => "BaseUnit",
                    "in_date" => "Period",
                    "inventory_class" => "InventoryClass",
                    "certificate" => "docno",
                    "correspondents" => "Partner",
                    "revenue_json" => "ArrivalBaseQuantity,ArrivalPrice,ArrivalSubQuantity,ArrivalSubPrice,ArrivalAmount",
                    "emit_json" => "DispatchBaseQuantity,DispatchPrice,DispatchSubQuantity,DispatchSubPrice,DispatchAmount",
                    "settle_balance_json" => "BaseQuantity,Price,SubQuantity,SubPrice,Amount",
                ],
                "infoField" => [
                    "voucher_code" => "voucherCode",
                ],
            ]
        ],
    ];
    /***
     *   消息订阅配置
     *
     */
    public static $msg_subscribe_config = [
        //采购发票
        "PurchaseInvoice" => [
            "controller" => "TplusPurchaseInvoice",
            "Field" => [
                "voucher_id" => "",
            ]
        ],
        //销售发票 _Create _Delete _Update
        "SaleInvoice" => "TplusSaleInvoice",
        //其他入库
        "OtherReceiveVoucher" => "TplusOtherInboundOrder",
        //其他出库
        "OtherDispatchVoucher" => "TplusOtherOutboundOrder",
        //入库调整
        "AdjustCostInVoucher" => "TplusInboundAdjustmentOrder",
        //出库调整
        "AdjustCostOutVoucher" => "TplusOutboundAdjustmentOrder",
        //调拨
        "TransVoucher" => "TplusTransferOrder",
        //收款
        "ArapReceive" => "TplusReceiptOrder",
        //付款
        "ArapPayment" => "TplusPaymentOrder",
        //盘点单
        "CheckVoucher" =>"TplusCountOrder",
        //采购费用分摊单 没有接口，只有 费用单新增
        "ExpenseVoucher" => "TplusFeeCostShare",
        //预收冲应收
        "ArapStrikeBalanceAdvReceiveAr" => "TplusPreReceivableToReceivable",
        //预付冲应付
        "ArapStrikeBalanceAdvPaymentAp" => "TplusPrePaymentToPayment",
        //应收冲应收
        "ArapStrikeBalanceArAr" => "TplusReceivableToReceivable",
        //应付冲应付
        "ArapStrikeBalanceApAp" => "TplusPaymentToPayment",
        //应收冲应付
        "ArapStrikeBalanceArAp" => "TplusReceivableToPayment",
    ];
    /***
     *   获取业务配置
     *
    */
    public static function getConfig($controller = "TplusCountOrder"){
        return self::$Field[$controller];
    }
    /***
     *   订阅标识获取报表配置
     * @param string SubscribeCode
     *
    */
    public static function getMsgSubscribeConfig($SubscribeCode = ""){
        return self::$msg_subscribe_config[$SubscribeCode];
    }

}

